using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace BardsTaleViewer {
  static class Program {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main () {
      Application.EnableVisualStyles ();
      Application.SetCompatibleTextRenderingDefault (false);
      Application.Run (new Form1 ());


      //int bardVersion = 4;

      //if (bardVersion == 1) {
      //  byte [] dumpAmiga = Properties.Resources.pics1.Extract (0);
      //  byte [] dumpAtari = Properties.Resources.BPICS.Extract (0);
      //  int nbAmiga = (int) dumpAmiga.ReadLong (0) / 4;
      //  int nbAtari = (int) dumpAtari.ReadLong (0) / 4;

      //  int pictureIndex = 0;
      //  if (pictureIndex != -1) {
      //    Application.EnableVisualStyles ();
      //    Application.SetCompatibleTextRenderingDefault (false);
      //    Application.Run (new Form1 (dumpAtari, dumpAmiga, pictureIndex, 1));
      //  }
      //  else {
      //    for (int i = 0; i < nbAmiga; i++)
      //      Picture_Amiga.Load (null, dumpAmiga, i, 1);

      //    for (int i = 0; i < nbAtari; i++)
      //      Picture_Atari.Load (dumpAtari, i);
      //  }
      //}

      //else if (bardVersion == 2) {
      //  byte [] dumpAmiga = Properties.Resources.pics2.Extract (0);

      //  int pictureIndex = 0;
      //  Application.EnableVisualStyles ();
      //  Application.SetCompatibleTextRenderingDefault (false);
      //  Application.Run (new Form1 (null, dumpAmiga, pictureIndex, 2));
      //}

      //else if (bardVersion == 3) {
      //  byte [] dumpAmiga = Properties.Resources.pics3.Extract (0);
      //  byte [] temp = new byte [dumpAmiga.Length + 1];
      //  dumpAmiga.CopyTo (0, temp, 0, dumpAmiga.Length);
      //  dumpAmiga = temp;

      //  int pictureIndex = 0;
      //  Application.EnableVisualStyles ();
      //  Application.SetCompatibleTextRenderingDefault (false);
      //  Application.Run (new Form1 (null, dumpAmiga, pictureIndex, 3));
      //}

      //else if (bardVersion == 4) {
      //  //Picture_PC pic = Picture_PC.Load ("Test/Menu", 0);
      //  //pic.Bitmap.Save ("test.png");
      //  //return;

      //  int pictureIndex = 22;
      //  Application.EnableVisualStyles ();
      //  Application.SetCompatibleTextRenderingDefault (false);
      //  Application.Run (new Form1 (null, null, pictureIndex, 4));
      //}
    }
  }
}
